#ifndef commonfunc_h
#define commonfunc_h

//void bit_true_atomic(unsigned char x,unsigned char mask);
//void bit_false_atomic(unsigned char  &x, unsigned char mask);
//void bit_toggle_atomic(unsigned char  &x, unsigned char mask);

#define bit_true_atomic(x,mask) {(x) |= (mask); }
#define bit_false_atomic(x,mask) { (x) &= ~(mask);  }
#define bit_toggle_atomic(x,mask) {(x) ^= (mask); }

char *PSTR(char* infoIn);
char pgm_read_byte_near(const char *s);
void _delay_ms(int time);
void _delay_us(int time);
char eeprom_put_char(int address, char * s);
char eeprom_get_char(int address);
char memcpy_to_eeprom_with_checksum(int address, char * s, int byteLength);
char memcpy_from_eeprom_with_checksum(char * s, int address, int byteLength);
#endif
